home *** CD-ROM | disk | FTP | other *** search
- /* Listing 2 */
- /*****************************************************
- Name: DBG_STAK.C
- Description: Library of functions to support
- bidirection communications with
- PC parallel port.
- Global Function List: get_min_stackavail
- check_min_stackavail
- Portability: MS-DOS Microsoft C or Borland C
- *****************************************************/
-
- #include <<limits.h>>
- #include <<malloc.h>>
- #include <<stdlib.h>>
-
- static size_t _MinStackAvail = UINT_MAX;
-
- /*****************************************************
- Name: check_min_stackavail
- Return: Minimum stack space up to the point this
- function is called.
- Description: Keeps track of the minimum stack space
- available.
- *****************************************************/
- size_t check_min_stackavail( void )
- {
- _MinStackAvail = min( _MinStackAvail,
- stackavail() );
- return ( _MinStackAvail );
- }
-
- /*****************************************************
- Name: get_min_stackavail
- Return: Minimum stack space up to the point this
- function is called.
- Description: Retrieves the minimum stack space
- available.
- *****************************************************/
- size_t get_min_stackavail( void )
- {
- return ( _MinStackAvail );
- }
-
- /* End of File */
-
-